package com.hedl.practice.diyJava.inherit;

public class Person {
    protected String name;
    protected Integer age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
    public Person(){}
    public Person(String name,Integer age){
        this.name = name;
        this.age = age;
    }

    public String toString(){
        return "姓名："+name+"\n"+"年龄："+age;
    }
}
